import request from '@/utils/request'

export const regAPI = obj => request.post('/api/reg', obj)
// 登录的请求
export const loginAPI = obj => request.post('/api/login', obj)
// 获取用户信息
export const getUserAPI = () => {
  return request.get('/my/userinfo')
}
// 更新用户数据
export const updateUserAPI = data => request.put('/my/userinfo', data)

// 重置密码
export const updatepwdAPI = data => request.patch('/my/updatepwd', data)

// 更换头像
export const uploadAPI = base64 => request.patch('/my/update/avatar', { avatar: base64 })
